<!DOCTYPE html>
<html>
<#include "../../common/header.ftl">
<script src="${basePath}/js/backImage/list.js?v=201711021700"></script>

<head>
<meta charset="UTF-8">
<title>背景图管理</title>
<style>
	.left{
		float:left;
		min-width:100px;
		margin-left: 10px;
	}
	.table-margin{
		margin:5px 3%;
		width:92%;
	}
</style>

</head>
<body>
   
<div class="container" style="margin-left:5%;width:90%">
	<form class="layui-form left" action="#" >
		<div class="layui-form-item ">
		</div>
	</form>
</div>
<table class="table table-margin">
  <thead>
      <tr>
         <th>标题</th>
         <th>英文标题</th>
         <th>封面图</th>
         <th>页面</th>
         <th>位置</th>
         <th>操作</th>
      </tr>
  </thead>
  <tbody>
	<#list list! as image>
		<tr>
			<td>${image.name!}</td>
			<td>${image.englishName!}</td>
			<td>
			<#if image.type==2 && image.site==1>
				<img  src="${imgUrl+image.image}" height="108px" width="100px" data-toggle="modal" data-target="#imgModal"  />
			<#else>
				<img  src="${imgUrl+image.image}" height="51px" width="100px" data-toggle="modal" data-target="#imgModal" />
			</#if>
			</td>
			<td><#if image.type?? && image.type==1 >首页
				<#elseif image.type?? && image.type==2>发现页
				</#if>
			</td>
			<td>
				<#if image.type==1 && image.site==1><img src="${basePath}/images/buy1.png" height="40px" width="75px" />
				<#elseif image.type==1 && image.site==2><img src="${basePath}/images/buy2.png" height="40px" width="75px" />
				<#elseif image.type==1 && image.site==3><img src="${basePath}/images/buy3.png" height="40px" width="75px" />
				<#elseif image.type==1 && image.site==4><img src="${basePath}/images/buy4.png" height="40px" width="75px" />
				<#elseif image.type==2 && image.site==1><img src="${basePath}/images/find1.png" height="40px" width="75px" />
				<#elseif image.type==2 && image.site==2><img src="${basePath}/images/find2.png" height="40px" width="75px" />
				<#elseif image.type==2 && image.site==3><img src="${basePath}/images/find3.png" height="40px" width="75px" />
				</#if>
			</td>
			<td >
			<div class="btn-group ">
			 <#if permission?? && (permission.P2102??)>
			  <button type="button" class="btn btn-primary edit-button" data-id="${image.id!}">修改 </button>
			 </#if>
			</div>
			</td>
		</tr>
	</#list>
  </tbody>
</table>
</body>
<script type="text/javascript">
	var basePath="${basePath}";
	var init={
	}
	$(function(){
		layui.use(['form', 'layer'] , function(){
		  var layer = layui.layer;
		  var form = layui.form(); 
	});
});
</script>
</html>